|
|
- Mindstorms -- programming with leJOS
- Again, let's start with a robotic "Hello World"
import josx.platform.rcx.Motor;
public class MoveForward {
public static void main(String[] args) {
while (true) {
Motor.A.forward();
Motor.C.forward();
}
}
}
Motor.A & Motor.C are static variables inside of the Motor class, so we can call those directly
We need to have the while loop, so the main class doesn't return right away.
|
|